#ifndef MINICAP_H
#define MINICAP_H

#include <QObject>
#include <QMutex>
#include <qprocess.h>

class MiniCap : public QObject
{
    Q_OBJECT
public:
    explicit MiniCap(QObject *parent = nullptr);
    ~MiniCap();

    static MiniCap* getInstance();
    int prepare();
    int startServer();

signals:
    void onCapStatusChange(int state, int ret);

public slots:

private:
    static QMutex mutex;
    static QAtomicPointer<MiniCap> instance;

    QProcess* serverProcess;

    QString binName;
};

#endif // MINICAP_H
